<?php
include("inc/conn.inc");
include("page.php");
$hove=2;
$url="xiangmu.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=30;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>项目推荐-三帝加盟网</title>
<link href="/css/body.css" rel="stylesheet" type="text/css" />
<link href="/css/head.css" rel="stylesheet" type="text/css" />
<link href="/css/xiangmu.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include("top.php");?>
<div id="main" class="topside6">
<script type="text/javascript">
/*960*90，加盟首页-创建于2011-11-9*/ 
var cpro_id = 'u672448';</script>
<script 
src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
</div>
<div id="main" class="topside6">
  <div class="left">
    <div class="sideyellow1">
      <div class="title01"><img src="/images/fenlei.gif" width="190" height="27" /></div>
	    <DIV class=c_subNav>
		<?php
	    $rs=@mysql_query("select * from jm_catalog where cat_id=0 order by id asc");
		while($row=@mysql_fetch_array($rs)){
	   ?>
          <UL>
             <LI class="li charges">
			    <!--[if IE 6]><a class="li" href="#nogo">
                  <TABLE>
                      <TBODY>
                      <TR><TD>
			    <![endif]--><A class=option href="/jiameng/list-<?=$row['id']?>/1.html" target=_blank _fcksavedurl="#nogo"><?=$row[cat_name]?></A> 
            <UL>
			  <?php $rs2=@mysql_query("select * from jm_catalog where cat_id='".$row['id']."' order by id asc");
			     while($row2=@mysql_fetch_array($rs2)){
			  ?>
               <LI class=li><A class=option href="/jiameng/list-<?=$row2['id']?>/1.html" target=_blank _fcksavedurl="#nogo"><?=$row2[cat_name]?></A></LI>
			  <?php }?>
		    </UL>
			    <!--[if IE 6]>
                      </TD></TR>
                      </TBODY>
				</TABLE></a>
				<![endif]-->
			</LI></UL>
	  <?php }?>
	  </DIV>
    </div>
  </div>
<div class="right sideyellow1">
<div class="title02"><span><a href="#">>>更多</a>&nbsp;&nbsp;</span>项目推荐</div>
<div class="txt02">
<ul>
<?php 
  $rs=@mysql_query("select * from jm_list where j_sh=1 order by id desc limit ".($thepage-1)*$maxpage.",$maxpage");
  while($row=@mysql_fetch_array($rs)){
  if($row[picture])
  {
  $url2="../upfile/".$row[picture];
  $info=getImgInfo($url2);  
  ?>
	<li>
	<span><table width="120" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="middle"><img src="http://img.sandib2b.cn/<?=$row[picture]?>" width=" <?=$info[width]?>" 
	height="<?=$info[height]?>" /></td>
  </tr>
</table>
</span>
	<dl>
	   <dt><a href="/jiameng/xiangmu/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[j_title],0,8,'utf-8')?></a></dt>
	   <dd class="b size14 fontyellow"><?=$row[j_price]?></dd>
	</dl>
	</li>
<?php
}else{
?>	
	<li>
	<span><table width="120" height="100" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="middle"><img src="http://img.sandib2b.cn/index.gif" width="120" 
	height="120" /></td>
  </tr>
</table>
</span>
	<dl>
	   <dt><a href="/jiameng/xiangmu/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[j_title],0,8,'utf-8')?></a></dt>
	   <dd class="b size14 fontyellow"><?=$row[j_price]?></dd>
	</dl>
	</li>
	
<?php 
}
}
$rs2=@mysql_query("select count(id) from jm_list where j_sh=1 ");
$totalrecord=@mysql_result($rs2,0); 
$totalpage=ceil($totalrecord/$maxpage);
@mysql_free_result($rs2);
?>
</ul>
</div>
<div class="onl"></div>
<div class="page">
<div class="pageleft">
<ul>
<?php pages2("/jiameng/xiangmu/page/",$thepage,$totalpage,$maxpage,4);?>
</ul>
</div>
<div class="pageright">
<form name="pageform" method="post" action="" onSubmit="return onCheckPage()"> 
共<?=$totalpage?>页　到
<input type="text" name="page" class="input-txt" size="5" maxlength="5">页
<input type="submit" value="确定" class="but">
</form>
<script language="javascript"> 
function onCheckPage(){
var page = parseInt(document.pageform.page.value); 
if(isNaN(page)){
alert("请输入数字(1,<?=$totalpage?>)");
return false; 
}
if(page<=0){
page =1; 
}
if(page ><?=$totalpage?>){
page=<?=$totalpage?>;
}
if(page>1){
document.pageform.action = "/jiameng/xiangmu/page/"+page+".html"; 
}else{
document.pageform.action = "/jiameng/xiangmu/page/1.html"; 
}
return true;
}
</script>
  </div>
<div class="onl"></div>
</div>
</div>
<div class="onl"></div>
</div>
<div id="main" class="topside6 side">
<script type="text/javascript">/*960*90，加盟首页-创建于2011-11-9*/var cpro_id = 'u672448';</script><script 
src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
</div>
<?php include("foot.php");?>

</body>
</html>
<script type="text/javascript">/*120*270，创建于2011-3-23*/ var cpro_id = 'u419785';</script><script src="http://cpro.baidu.com/cpro/ui/f.js" type="text/javascript"></script>